
//package java_cup;

/** ExceptionXml subclass for reporting internal errors in JavaCup. */
public class InternalError : Exception {
    public const long serialVersionUID = 6818094007368386287L;

    /** Constructor with a message */
    public InternalError(String msg) : base(msg) {
    }

    /**
     * Method called to do a forced error exit on an internal error for cases when
     * we can't actually throw the exception.
     */
    public void crash() {
        ErrorManager.instance.emitFatal("JavaCUP Internal ExceptionXml Detected: " + Message);
        //printStackTrace();
        //System.exit(-1);
    }
}
